import time
def read(file):
    f = open(file)
    s = [int(x) for x in f]
    return s
def func(b):
    for j in range(len(b) - 1):
        for k in range(len(b) - j - 1):
            if a[k] > a[k + 1]:
                a[k], a[k + 1] = a[k + 1], a[k]
    return b
m1 = read("/home/student/Рабочий стол/Кузовкин Влад/m1_sorted.txt")
m2 = read("/home/student/Рабочий стол/Кузовкин Влад/m2_reverse.txt")
m3 = read("/home/student/Рабочий стол/Кузовкин Влад/m3_shuffle.txt")
m1_s = time.time()
m1_line = func(m1)
m1_f = time.time()
m2_s = time.time()
m2_line = func(m2)
m2_f = time.time()
m3_s = time.time()
m3_line = func(m3)
m3_f = time.time()
print("m1_sorted", round((m1_f-m1_s)*1000), "millsecond")
print("m2_reverse", round((m2_f-m2_s)*1000), "millsecond")
print("m3_shuffle", round((m3_f-m3_s)*1000), "millsecond")
